package com.qf.config;

import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.amqp.rabbit.listener.exception.FatalListenerStartupException;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import sun.nio.cs.FastCharsetProvider;

@Configuration
public class Myconfig {

    /*
    * 声明一个交换机
    * */
    @Bean
    public FanoutExchange fanoutExchange(){

        return new FanoutExchange("2102fanout",false, false);
    }
    @Bean
    public DirectExchange directExchange(){
        return new DirectExchange("bk2102EXCHANGE1",false,false);
    }

   @Bean
   public TopicExchange topicExchange(){
        return new TopicExchange("qwe");
   }

//    @Bean
//    public TopicExchange topicExchange() {
//        return new TopicExchange("meiyouduiliedejiaohuanji");
//    }

}
